﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MusicMaker
{
    public class Music
    {
        //通道列表
        public List<Channel> channels = new();
        //音乐的名字
        public string title;
        //音乐的速度
        public int speed;

        /*
         Music的格式
        music(title, speed)[
        channel 1
        channel 2
        ...
        channel n
        ]
         */

        public override string ToString()
        {
            string head = string.Format("music(\"{}\",{})", title, speed);
            string body = "";
            body += "[\n";
            foreach(Channel channel in channels)
            {
                body += channel.ToString() + "\n";
            }
            body += "]";
            return body + head;
        }
    }
}
